<form action="{'SaleOrder/update'|U}" method="POST" beforeSubmit="checkSaleaState">
{wz action="save,list,reset"}
<div class="add_box">
<table cellspacing="0" cellpadding="0" class="add_table">
    <tbody>
    	  <tr>
    			<th>
    			<div class="titleth">
    				<div class="titlefl">{$lang.sale_order_basic}</div>
    				<div class="afr">{$lang.sale_no}：{$rs.sale_order_no}</div>
    			</div></th>
    		</tr> 
         <tr><td>
         <div class="basic_tb">
          <ul> 
<input type="hidden" name="id" id="id" value="{$rs.id}"/> 
<input type="hidden" name="sale_order_state" 	id="sale_order_state" value="1">
<input type="hidden" name="pre_delivery" 		id="pre_delivery" value="{$rs.sale_order_state}">
<input type="hidden" name="client_id" 			id="client_id" value="{$rs.client_id}">
<input type="hidden" name="flow" id="flow" value="sale">
<li>{$lang.client_name}：{$rs.client_name}
{company  type="li" title=$lang.basic_name view=true
hidden=['name'=>'basic_id','id'=>'basic_id','value'=>$rs.basic_id]
name='basic_name' value=$rs.basic_name
}
{currency data=C('CLIENT_CURRENCY') name="currency_id" id="currency_id" value=$rs.currency_id type='li' title=$lang.currency_name require="" view=true}
<li>{$lang.sale_date}：
					<input type="text" name="order_date"  id="order_date" value="{$rs.fmd_order_date}" class="Wdate spc_input" 

{if 'digital_format'|C==eur}
{literal} 
onClick="WdatePicker({dateFmt:'dd/MM/yy HH:mm:ss'})"
{/literal}
{else}
{literal} 
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
{/literal}
{/if}


/>__*__</li> 
					{if C('sale.relation_sale_follow_up')==1}
					<li>{$lang.expect_shipping_date}：
					<input type="text" name="expect_shipping_date"  id="expect_shipping_date" value="{$rs.fmd_expect_shipping_date}" class="Wdate spc_input" 
onClick="WdatePicker()"
/>__*__</li> 						
					{/if}
</ul>
         </div>
         </td></tr>   
          <tr><th>{$lang.sale_order_detail}</th></tr>   
          <tr><td>{include file="SaleOrder/detail.tpl"}</td></tr>
          <tr><td valign="top" class="b_top">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="add_table_money">
				  <tr>
				    <td class="b_top t_right">{$lang.preferential_money}：</td>
				    <td width="121" class="b_top t_right"><span><input type="text" name="pr_money" onkeyup="$.dealWithPM();" id="pr_money"  value="{$rs.dml_pr_money}" ></span></td>
				    <td width="60" class="b_top">&nbsp;</td>
				  </tr>
				    <tr id="sale_funds_after">
				    <td class="b_top t_right" >{$lang.after_preferential_money}：</td>
				    <td class="b_top t_right_red pad_right_3" id="after_preferential_money">{$rs.real_money}</td>
				    <td class="b_top">&nbsp;</td>
				  </tr> 
				  </table>
				 {if C('sale.show_sale_advance')==1}
				 {include file="Accounts/sale_funds_list.tpl"}
					 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="add_table_money">
					    <tr>
					    <td class=" b_top t_right"><div>{include file="Accounts/sale_funds.tpl"} </div></td>
					  </tr></table> 
			     {/if}
				  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="add_table_money">
				  <tr id="payadd">
				    <td class="t_right b_top">{$lang.need_get_money1}：</td>
				    <td class="b_top t_right" width="121"><span class="t_right_red" id="need_get_money">{$rs.fund.sale_order_paid.dml_need_paid}</span> </td>
				    <td class="b_top" width="60"><input type="hidden" id="old_need_get_money" value="-{$rs.fund.advance_have_paid.edml_money}"></td>
				  </tr> 
				  </table>
          </td></tr>
          <tr><td class="pad_top_10">
	          <table width="100%" cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr>
					<td width="8%" valign="top" >{$lang.upload_pic}：</td>
					<td class="t_left" valign="top">
						{upload tocken=$file_tocken sid=$sid type=3}
						{if $rs.pics}
							{showFiles from=$rs.pics delete=true}
						{/if}
					</td>
					<td width="7%" valign="top">{$lang.receive_addr}：</td>
					<td class="t_left" width="25%" valign="top"><textarea id="receive_addr" class="textarea_height80" name="receive_addr">{$rs.edit_receive_addr}</textarea></td>
					<td width="7%" valign="top">{$lang.comments}：</td>
					<td class="t_left" width="25%" valign="top"><textarea id="comments" class="textarea_height80" name="comments">{$rs.edit_comments}</textarea></td>
					</tr>
				</tbody>
			 </table>
      </td></tr>                      
   </tbody>          
  </table>
  {staff add_user="`$rs.add_real_name`" create="`$rs.fmd_create_time`" id="`$rs.add_user`"}
</div>
</form> 
